Garbage collection refers to techniques to reclaim memory that has been allocated but is no longer being used. The reclaimed memory may then be put back into the general memory pool for re-allocation. Some programming languages perform garbage collection automatically, while other languages expect the programmer to code the management of garbage collection.
Garbage collection may involve scanning a stack for dead pointers. Dead pointers point to allocated objects that are no longer used. Once objects are only referred by dead pointers, they may be removed to free up memory space. Today's conservative garbage collection techniques fail to effectively remove dead pointers.